WindowDetective 1.0.0				 November 27, 1995
by Jeff Beeghly
Copyright © 1995.  This file is copyrighted with all rights reserved.




Contents
	Introduction
	What IS WindowDetective?
	Getting Started With WindowDetective
	Know Bugs
	Know Features (not bugs!)
	Registered vs. Unregistered
	Release & Distribution
	Contacting the Author
	Registering
	Shareware Fees
	Methods of Payment
	Legal Stuff






Introduction

	Thanks for checking out WindowDetective!  WindowDetective is a tool to de-bug (and catch bugs in) applications.  Developers can use WindowDetective to aid them in their development cycle.  Are Quickdraw calls not drawing in the right location and you believe the Regions in you application (visible, clip, etc...) are getting corrupted?  Use WindowDetective!  Software testers (or Quality Assurance Engineers) can use WindowDetective for scripted regression testing and everyday guerrilla testing.


What IS WindowDetective?

	WindowDetective is a tool which allows you to view the WindowRecord and GrafPort records of any window.  Once you have viewed the contents of a certain window, you may print the data, copy the data to the clipboard, or save the data as a text file.


Getting Started With WindowDetective

	WindowDetective is a fairly straight forward application, so IÕll keep this short and sweet.  To view the GrafPtr or WindowRecord of any window, click on the magnifying glass button.  At this point the cursor will change into a magnifying glass.  Move the cursor over the window you wish to examine and click the mouse button.  If the process was successful, the WindowDetective window will be updated and will display the WindowRecord of the window.


Know Bugs

	For some reason, if you select a floating window (like the ones in Dean YuÕs Develop article, ÒFloating Windows: Keeping Afloat in the Window ManagerÓ), WindowDetective does not recognize the floating window as BEING a window.  Maybe it has something to do with DeanÕs method of bypassing the standard update routines for floating windows.  However, the Apple Human Interface Guidelines state that floating windows should disappear when the application is in the background, so this scenario should never happen, right?


Know Features (not bugs!)

	WindowDetective was not designed to display information in a list-tree format.  Consequently, some limitations and assumptions have been incorporated into the application.
	For example, Region members are a variable-length structure, but the first Rect in the Region is the only data displayed (other than the Size member).  The updateRgn member will usually contain one Rect and be of Size 10 (2 bytes for the Size and 8 bytes for the Rect).  However, the strucRgn (which is typically more complex than the updateRgn) will contain a larger Size, yet WindowDetective will only display the first Rect.

	Also, the WindowDetective data window is not automatically updated.  Every time you wish to examine the contents of your application, you will need to perform the process described in the section, ÒGetting Started With WindowDetective.Ó


Registered vs. Unregistered

	The registered and the unregistered versions of WindowDetective are exactly the same with two exceptions.  First, the about box/splash screen displays the word ÒRegisteredÓ for the registered version, and ÒUnregisteredÓ for the unregistered version.  Second, the unregistered version does not support Apple Events or Apple Script.  The registered version however does support scripting and includes the following commands:

	CenterWindow.  This API tells WindowDetective to center it's window within the main monitor (if you have more than one monitor operating, this API will center the window in the monitor which contains the Apple menu bar).

	CopyContents.  This API copies the contents of the WindowDetective window into the clipboard (provided there is data to copy!).

	DisplayGrafPtr.  This API tells WindowDetective to display the GrafPtr portion of it's data.

	DisplayWinRec.  This API tells WindowDetective to display the WindowRecord portion of it's data.

	LocateWindowAt.  With this API, you may pass either two or three arguments.  If you pass two arguments, WindowDetective will attempt to locate the window at arg1, arg2 (global coordinates).  If you pass three arguments, WindowDetective will not only attempt to locate the window at arg1, arg2, but it will move the mouse to that location as well.

	MoveWindow.  This API tells WindowDetective to move it's window by {delta x, delta y}.

	MoveWindowTo.  This API tells WindowDetective to move it's window to {arg1, arg2}.

	SaveWithParams.  This API tells WindowDetective to save it's data (if it has any available).  With this API, you need to pass a file object, then a creator type (the creator of the TEXT file).  The file creator types are: 1 CodeWarrior, 2 MPW, 3 Microsoft Word, 4 Teach Text, 5 Think C, 6 Word Perfect.

	Why is this desirable?  If you do any sort of scriptable regression testing, this is a must!


Release & Distribution
 
    Unless explicitly stated in writing, I do not grant permission to distribute WindowDetective for profit in any form, including but not limited to, electronic information service distribution, bulletin board distribution, and magnetic or optical medium distribution.  Non-profit distribution of the software is acceptable without prior written notice, providing that the software is not modified in any way, and the complete works of the software are included in the distribution package.


Contacting the Author

	If you have any comments or suggestions, please feel free to e-mail me at sd@compumedia.com or jeff_beeghly@dbug.org.  I may be switching from compumedia to another provider soon, so if you e-mail me at sd@compumedia.com and donÕt receive a reply from me within a couple of days, try e-mailing me at jeff_beeghly@dbug.org.  If you do not have any means to send e-mail over the Internet, you may write to me at:

	Jeff Beeghly
	10552 14th NW
	Seattle, WA  98177
	USA


Registering

	WindowDetective is ShareWare.  You may distribute the unregistered version of the application, provided that the application and none of itÕs documents are altered.  If you keep this program after the 30-day trial period, you are obligated to purchase WindowDetective and must register your copy.

	Please use the following form as a guideline when registering WindowDetective:
=================================================================
Name:
Company:
Address:

City:			State:			Zip:
Country:
Phone:
FAX:
E-mail Address(es):
    ¥	Internet:
    ¥	CompuServe:
    ¥	America Online:
    ¥	AppleLink:


Comments:









=================================================================

Shareware Fees
¥  Single Machine License    Ñ  US$15.00
¥  2 - 20 Machine License    Ñ  US$10.00 per machine
¥  21 - 50 Machine License   Ñ  US$250.00 (flat rate)
¥  51 - 100 Machine License  Ñ  US$500.00 (flat rate)
¥  Unlimited Site License    Ñ  US$650.00 (flat rate)


Methods of Payment

	At this point in time, the only way I can process orders is by either a US check or a postal money order.  If this does not work out for you (like the payment has to placed on your companies VISA card), please contact me at the address or e-mail address listed above.


Legal Stuff

	This is a legal agreement between you and the Author. The terms of this Agreement govern your use of this software. Please read this agreement carefully before you register this package. By registering this package, you are agreeing to be bound by this Agreement.

	In consideration of payment of the license fee, the Author, as Licenser, grants you, as Licensee, a non-exclusive right to use and display this copy of the software on a single computer (i.e. a single CPU) at one location at any time.

	The software and the accompanying written materials are protected by International Copyright laws. Unauthorized copying of the software, is expressly forbidden. You may be held legally responsible for any copyright infringement that is caused or encouraged by your failure to abide by the terms of this agreement. Subject to these restrictions, you may make one (1) copy of this software solely for back-up purposes provided such a back-up copy contains the same proprietary notices as appears in this software.

	As the Licensee, you may physically transfer the software from one computer to another provided that the software is used only on one computer at a time. You may not distribute copies of the software, once registered, to others. You may not modify, adapt, translate, reverse engineer, decompile, disassemble, or create derivative works based on the software. You may not modify, adapt, translate or create derivative works based on the written materials without the prior consent of the publisher.

	This software is licensed to only you, the Licensee, and may not be transferred to anyone else without the prior written consent of the Author. In no event may you transfer, assign, rent, lease, sell or otherwise dispose of this software on a temporary or permanent basis except as expressly provided herein.

	THE SOFTWARE AND ACCOMPANYING WRITTEN MATERIALS ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EXPRESSED OR IMPLIED, AND AUTHOR SPECIFICALLY DISCLAIMS THE WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE AND MERCHANTABILITY.

	THE ABOVE ARE THE ONLY WARRANTIES OF ANY KIND, EITHER EXPRESSED OR IMPLIED, THAT ARE MADE BY AUTHOR ON THE SOFTWARE. NO ORAL OR WRITTEN INFORMATION OR ADVICE GIVEN BY AUTHOR, ITS DEALERS, DISTRIBUTORS, AGENTS OR EMPLOYEES SHALL CREATE A WARRANTY OR IN ANY WAY INCREASE THE SCOPE OF THIS WARRANTY, AND YOU MAY NOT RELY UPON SUCH INFORMATION OR ADVISE. THIS WARRANTY GIVES YOU SPECIFIC LEGAL RIGHTS. YOU MAY HAVE OTHER RIGHTS, WHICH VARY ACCORDING TO JURISDICTION.

	NEITHER AUTHOR NOR ANYONE ELSE WHO HAS BEEN INVOLVED IN THE CREATION, PRODUCTION OR DELIVERY OF THE SOFTWARE SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, CONSEQUENTIAL OR INCIDENTAL DAMAGE (INCLUDING DAMAGE OR LOSS OF BUSINESS PROFIT, BUSINESS INTERRUPTION, LOSS OF DATA, AND THE LIKE) ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE EVEN IF THE PUBLISHER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. SOME JURISDICTIONS MAY NOT ALLOW THE EXCLUSION OF LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGE.  THE AUTHOR RESERVES ALL RIGHTS NOT EXPRESSLY GRANTED TO LICENSEE.

